#!/bin/bash

args=(

 -device virtio-net-pci,netdev=net1 
 -netdev tap,id=net1,ifname=tap0,script=no 
 
 -device virtio-net-pci,netdev=net2 
 -netdev tap,id=net2,ifname=tap1,script=no 
 
 # 用于上网的Nat网卡
 -device virtio-net-pci,netdev=usernet1 
 -netdev user,id=usernet1,hostfwd=tcp::1222-:22

#	-device virtio-net-pci,netdev=net0,mac=00:50:00:00:01:00 
#	-netdev tap,id=net0,ifname=vunl0_1_0,script=no 
)


qemu-system-x86_64 \
	-smp 2 -m 4096 -name Linux -uuid 04dcf21d-378d-4a7a-9138-45f95f7569e9 \
	-vnc 0.0.0.0:10  \
	-cdrom ./ubuntu-22.04.5-desktop-amd64.iso \
	-machine type=pc,accel=kvm -vga std -usbdevice tablet \
	-boot order=cd -cpu host,vmx=off,svm=off  \
	-daemonize \
        ${args[@]}
